<template>
    <div>
        <top2></top2>
        <frame2 title="我的伙伴">
            <div id="back">
                <div id="divT">

                    <el-table id="t" :data="pData"  border stripe style="">
                        <el-table-column prop="token" label="联系人身份证令牌" width="180" />
                        <el-table-column prop="userName" label="联系人昵称" width="180" />
                        <el-table-column prop="userEmail" label="联系人邮箱" width="180" />
                        <el-table-column prop="userAuthority" label="联系人身份" width="180" />
                        <el-table-column label="操作">
                            <el-button size="small" @click="deletePartner(mod.row)">移除</el-button>
                        </el-table-column>
                    </el-table>

                </div>
                <div id="divF" style="margin-top: 40px">
                    <el-form ref="form" :model="form" label-width="120px">
                        <el-form-item label="recentcall_user_email" >
                            <el-input
                                    v-model="newUserEmail"
                                    :rows="2"
                                    type="textarea"
                                    placeholder="Please input"

                            />
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary" @click="addPartner()">新增联系人</el-button>
                        </el-form-item>
                    </el-form>

                </div>
            </div>
        </frame2>
    </div>
</template>

<script lang="ts">
    import Frame2 from "./Frame.vue";
    import fData from './data'
    import Table from "./Table.vue";
    import top2 from './top';

    export default {
        components: {Table
        ,Frame2,
        top2},
        data() {
            return {
                pData:[null],
                recentcall_user_email:'',
            }
        },

        mounted(){
            this.pData = fData.partners
            document.body.style.backgroundColor = "#c6e2ff"
            console.log(this.pData)
        },

        methods: {
            check(){
                this.$router.push('/projectInfo')
            },
            // addPartner(){
            //     axios.get()
            // },
            goToProjectList(){
                this.$router.push('/projectList')
            },
            // deletePartner(object) {
            //     this.$confirm('此操作将移除该伙伴, 是否继续?', '提示', {
            //         confirmButtonText: '确定',
            //         cancelButtonText: '取消',
            //         type: 'warning'
            //     }).then(() => {
            //         axios.delete('http://localhost:8181/fruit/delete/'+row.userId).then(function (response) {
            //             if(response.data){
            //                 this.$message({
            //                     type: 'success',
            //                     message: row.userName+'移除成功!',
            //                     callback: action =>{
            //                         location.reload()
            //                     }
            //                 });
            //
            //             }
            //         })
            //
            //     }).catch(() => {
            //         this.$message({
            //             type: 'info',
            //             message: '已取消删除'
            //         });
            //     });
            //
            //
            //
            // },


        },
    }
</script>
<style scoped>
    #t{
        margin-left: auto;
        margin-right: auto;

    }
    #back{
        height: 500px;
        width: 100%;
        background-color: white;
        margin: auto;
    }
    #divT,#divF{
        width: 100%;

    }

</style>
<style>

</style>